1. Field of the Invention
The invention relates to the field of stepping motors, and in particular to a controller for a stepping motor used to drive a scanner, printer or similar device. A microprocessor controller addresses the memory of a digital to analog converter, preferably a RAMDAC, having stored digital data representing Sine/Cosine combinations for assuming rotor-to-stator relative pole positions at increments over at least 90.degree. of a pole-to-pole passage (a complete pole passage being 360.degree.). The invention enables high resolution positioning of the stepping motor without the need for gear reduction, with reduced acoustic emissions and with the capability of a range of motions and speeds, and is especially useful for smooth starting and stopping operations when positioning a form to be printed or optically scanned.
2. Prior Art
The typical stepping motor is manufactured with 200 evenly spaced magnetic poles on the rotor and stator. Basic operation of the stepping motor involves coupling current to the field (stator) and/or armature (rotor) windings for electromagnetically drawing the rotor forward or backward, seeking alignment of the poles. For example, current is applied to selected field windings to rotate the armature via the interaction of magnetic fields produced by the field windings and permanent magnets fixed on the armature. The fields applied to the windings at different times magnetically pull and push the armature of the motor between pole positions.
Stepping motors are commonly driven by controllers for accurate automatic positioning of the armature of the stepping motor. Assuming the motor has 200 poles and can be positioned at any of them (e.g., by counting the advance of pole positions), the resolution would be 1.8.degree.. In many cases, this resolution is not adequate. For example, 1.8.degree. resolution for a 2" diameter drum is about .+-.0.030", which is not adequate where CCD scanner cells or the like are to encode printed or handwritten marks on a printed form to sufficient accuracy that they can be distinguished automatically by image processing software.
A stepping motor can be manufactured with more than 200 poles. However, the required accuracy of machining tolerances substantially increases the cost of the motor. It also is desirable to make the motor compact generally, placing further pressure on the design of the motor. If the motor is to be made, for example, with a pole resolution of 0.1.degree., or 3,600 steps per revolution, and assuming an armature diameter of 5cm (2 inches), the poles are spaced by only 4.4 microns (about two thousandths of an inch). The manufacture of such a stepping motor, with thousands of primary poles, is exceedingly difficult and cost prohibitive.
There are two basic methods for improving the resolution of a stepping motor system without adding additional poles, namely mechanical gear reduction and inter-pole positioning. For mechanical gear reduction, a set of different diameter pulleys or a train of different diameter meshed gears is coupled between the stepping motor and a driven output shaft, e.g., fixed to a drum feed mechanism. Several rotations of the stepping motor armature produce a single rotation of the gear reduction output shaft. The advance with each step or pole of the motor equates to a much smaller advance of the output shaft, and better resolution of positioning.
Gear reductions systems are effective for increasing the effective number of steps for achieving a single rotation of the output shaft, and improve the positioning resolution of the stepping motor system. The mechanical advantage afforded by the gear reduction assembly provides increased torque at the gear reduction output shaft. However, there are tradeoffs in cost, efficiency and speed. Gear reduction assemblies increase the complexity of the stepping motor system, and as a practical matter may lack the positioning accuracy desired due to the increased inertia of the armature and gear reduction assembly as compared to the armature alone, and due to unavoidable play in the mechanical interconnections. Gear reduction assemblies transfer power inefficiently from the armature to the load because a portion of the available energy is dissipated by friction and inertia in the gear reduction assembly. Increased maintenance, adjustment and lubrication may be necessary.
A form reader or scanner having a driven drum is disclosed, for example, in commonly owned U.S. Pat. application Ser. No. 07/902,549--Cannon et al, filed Jun. 22, 1992, which is hereby incorporated. Gear reduction is achieved by using a smaller pulley on a motor shaft and a larger pulley fixed to a rotatable driven drum, the two being coupled by a toothed belt. There is a further problem during acceleration of the transport drum according to this gear reduction design. As the motor is accelerated, the slack side of the belt vibrates at a natural frequency defined by the spacing between the pulleys and the belt tension. The toothed belt can sometimes advance relative to the pulley due to this vibration, and ride up on the driven pulley slack side. One or more belt teeth become misaligned with the inter-tooth gaps of the pulley, by a fraction of a tooth distance. With further advance around the pulley toward the tension side, the tooth of the belt snaps back between the pulley teeth, causing an audible noise, and at times a vibration that produces a discontinuity in the scanned image.
The drum scanner or similar device may advantageously need a resolution of 0.005", defining one incremental advance of the form to be scanned, and according to the foregoing Cannon application, one pixel increment along the feed direction. If the drive roller has a circumference of 2.00" and the stepping motor has poles defining a typical 200 steps per revolution, a gear reduction of 2:1 would seem to be required, with two revolutions at the motor reduced to one at the driven drum. However, there is a further requirement when scanning in distinct colors (e.g., red and green). In order that the transport drum not come to a complete stop when imaging each 0.005" line in each color alternately, the transport drum is actually stepped in 0.0025" intervals. Thus for the foregoing exemplary dimensions, the motor must proceed through four revolutions (800 steps) to achieve the necessary resolution at the transport drum.
Inter-pole positioning involves adjusting the currents in the windings of the motor to define inter-pole positions of the armature. Systems are known which are positionable directly between adjacent poles (i.e., half-stepping systems), as well as systems which define incremental positions at other fractional inter-pole positions, which can be termed micro-stepping systems.
Micro-stepping systems increase the controllable resolution of the stepping motor to a smaller increment than the distance between the poles, and therefore are similar to gear reduction systems but avoid some of the drawbacks. However, it may be necessary to use inter-pole positioning together with gear reduction to achieve a required balance between resolution, speed, and the complexity of the motor drive circuitry needed.
Assuming the motor is half-stepped (i.e., two steps per pole), the armature and field poles first are driven to become centered on one another, via armature-field pole magnetic attraction, and then are driven to become interleaved, via armature-field pole repulsion. Thus a stepping motor with 200 physical or primary poles can resolve to 400 steps when driven in half step mode. This description of half-stepping operation is simplistic because static positioning of the armature to a given pole position or between pole positions is only one possible manner in which the motor may operate. Additionally, controlled acceleration and deceleration, reversal, operation at distinct speeds, and other operations may be required. Due to the inertia of the armature, the frequency of the energizing current normally must be variable. A low frequency energizing current accelerates the motor from a stop, and this frequency is increased to bring the armature up to speed.
Microstepping allows for positioning of the motor shaft at the primary poles and several locations between each adjacent primary pole, using gradations of energizing currents and polarities, applied dynamically. Microstepping can significantly increase the resolution of a stepping motor system, defining thousands of microsteps per revolution even though only 200 poles are provided, and eliminating the need for a gear reduction assembly in applications that require precise step resolution and modest output torque. On the other hand, defining the driving current levels and switching the current signals to the windings in a manner which accounts for starting, stopping, reversal and the like, can be a complicated problem.
The present invention preferably uses a 1:1 coupling between the motor shaft and the driven drum of a scanner, printer or similar device as compared to the 4:1 coupling used in the device of application Ser. No. 07/902,549--Cannon et al, supra. There are some important benefits to the specific application of high resolution inter-pole positioning as compared to previous scanner/printer drives.
To achieve the same output rotational speed, the motor turns only at a fourth of the rotational speed used in a gear reduction arrangement of comparable resolution. Therefore, the acoustic emissions of the motor are reduced substantially and are lower in frequency. For example, with the transport described above advancing a form before a scanner at 10" per second, the motor would be full stepping at 4 KHz with mechanical gear reduction. (i.e., 10IPS/(2"/rev.)=5 rev./sec; and, 5 rev./sec * 800 steps/rev=4000 steps/sec).
With microstepping to four positions per pole, and a 1:1 coupling between the motor shaft and the driven shaft (thereby also avoiding certain mechanical problems), the current levels are corrected at a frequency of 4 KHz but the motor step frequency is only 1 KHz. As a result, the device can be operated at high speeds, much higher than 10 IPS, without the irritating high frequency acoustic emissions typical of full step driven motors. The frequency of audible noise according to the invention is on the order of 300 to 3,300 Hz, which if noticeable is not annoying.
Data storage and control functions according to the invention are facilitated by storing the required driving levels in an addressable memory coupled to a digital to analog converter, in particular a RAMDAC. The RAMDAC device was originally developed for driving high resolution video display drivers, such as VGA and high resolution VGA. The RAMDAC would be loaded with 256 sets of three color digital data values (for red, blue and green amplitude in particular proportions for distinct colors). The sets then could be selected by addressing the RAMDAC and read out as analog values, with obvious savings in addressing requirements and speed.
According to the present invention, the RAMDAC is used to store Sine and Cosine data tables that define the proportionate levels of motor winding currents for aligned and inter-pole positions. The values are read out as analog values to cause the motor to servo to the defined positions. A six bit RAMDAC is preferred, providing a resolution of one in 64 for each motor winding. Whereas the RAMDAC treats the data in sets, it ensures that when changing between one position and the next, the Sine and Cosine values will be changed at the same time instead of individually.
The RAMDAC is preferably a multiplying or proportioning type, wherein the output levels are produced as proportions of an input reference level at an analog input to the RAMDAC. By manipulating the reference level, the present invention provides for different states of operation, including normal, holding and shutdown. Similarly, by manipulating addressing and phase controls of driver stages coupled to the RAMDAC, data sufficient for encoding the Sine and Cosine over 90.degree. can provide Sine and Cosine values over 360.degree..
The typical video controller RAMDAC has a four-deep pipeline delay for reading out values. This would present a conflict for a motor controller, which preferably needs to be addressed randomly to any memory location in the RAMDAC. According to the invention, this difficulty is solved by clocking the RAMDAC four times with the same value presented to the P-port, to address the required data notwithstanding the pipeline.
The RAMDAC is addressed by a microprocessor, such as a PIC17C42 RISC processor. The Sine and Cosine values for only 90.degree. need to be stored in the RAMDAC, with the conversions necessary to fill in the remainder of 360.degree. being available by "folding" the table. More particularly, for Sine values, stepping backwards through the table from 90.degree. is used to read out values for 90 to 180.degree., and reversing the polarities of currents in the motor using phase-O and phase-1 control bits is used to convert the 0 to 180.degree. values to those for 180 to 360.degree.. The Cosine values can be stored and similarly converted, with appropriate attention to the phase angle, e.g., reading backwards and at reversed polarity for 90 to 180.degree., etc. Alternatively, the Cosine values can be determined from phase shifted addressing of the Sine table.
In connection with a form scanner or the like, it may be important to stop the transport immediately upon a certain occurrence (e.g., immediately after the form passes the read station, for avoiding jams). However, there is no guarantee that the poles of the motor will align at the stopping position to a natural detent. To avoid undue power dissipation, a "hold" output from the microprocessor is coupled to adjust the current reference used by the RAMDAC. Preferably, an LM334 regulator is arranged to draw a regulated current along the RAMDAC reference line, repeatably scaling the output in the normal mode. The hold output is arranged to switch on a current source transistor coupled to the LM334, thus reducing the current drawn from the RAMDAC reference line (by supplying the LM334 with some of the current it is regulated to draw). This scales down the current output level of the RAMDAC in the hold mode.
Similarly, in a shutdown mode, the processor provides a signal to block the reference current through the RAMDAC and thereby reduce power dissipation. A low-true blanking input to the RAMDAC is brought true, and the same signal is inverted and coupled to the RAMDAC current reference via a blocking diode. Forcing the current reference line high in this way renders the DMOS output stage of the RAMDAC inoperative (i.e., out of operative voltage range), and prevents power dissipation along the current reference line.
The analog level output by the RAMDAC is used to drive the motor windings using bridge driver circuits rather than single ended drivers. Whereas the time constant of the motor is a function of the voltage across its winding, inductance, and series resistance, bridge drivers allow for faster operation due to the increased voltage applied to the windings. A bridge driver has the inherent advantage over a single end driver in that the voltage across the motor can change polarity at the two inputs, effectively doubling the voltage applied.
There is an unstable condition that occurs when the Sine/Cosine term goes through zero in a drive circuit for single ended driving of four coils separately. Use of a bridge driver with the coils either in series or parallel eliminates the instability because there is always current flowing through the windings. A no-current condition occurs only when the drivers are shut down. In effect, the stepping motor is driven like a two-phase synchro motor.
A power servo loop causes the bridge drivers to seek a particular motor coil current, and a current sense resistor and analog comparator are coupled to the bridge drivers to increase the current until the defined level is reached. To prevent over-shooting, the output of the analog comparator triggers a one-shot that disables the bridge driver until the one shot times out. The dual control path, including current sense feedback and the one-shot, compensates for delay that could allow the coil current to overshoot the required level. The one-shot ensures that there are only two pole terms in effect, namely the time constant of the coil and the period of the one-shot. This allows for easier power supply filtering.
Non-inductive elements are used in the control circuits where possible to reduce instability in the servo loop. For example, the current sense resistors are preferably 1/2W carbon film types rather than wire wound. The current sense resistors are arranged in parallel to handle worst case power dissipation.
An RC filter is arranged between each bridge driver and the power supply to better accommodate transient current demands on the power supply. When current is applied from the coil, it can be supplied initially from the capacitor. The resistor in the RC filter is preferably also a carbon film device to avoid inductance effects.
A number of additional details of the invention can be found in the following discussion of its objects and preferred exemplary embodiments.